package com.fanshuai.soring.boot.config;

import com.fanshuai.soring.boot.webflux.MyDispatcherHandler;
import com.fanshuai.soring.boot.webflux.MyHandlerMapping;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.DispatcherHandler;
import org.springframework.web.reactive.config.WebFluxConfigurationSupport;
import org.springframework.web.reactive.result.method.annotation.RequestMappingHandlerMapping;

@Configuration
public class WebFluxConfig extends WebFluxConfigurationSupport {
    @Override
    public DispatcherHandler webHandler() {
        return new MyDispatcherHandler();
    }

    @Override
    protected RequestMappingHandlerMapping createRequestMappingHandlerMapping() {
        return new MyHandlerMapping();
    }
}
